# 计算本文件所在目录
get_filename_component(mdx_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}/../../../" PATH)

# 头文件
set(mdx_INCLUDE_DIR "${mdx_CMAKE_DIR}")

# 库文件（导入库）
set(mdx_LIB "${mdx_CMAKE_DIR}/lib/mdx.dll.lib")

# 运行时（dll）同目录即可，无需额外处理
set(mdx_DLL "${mdx_CMAKE_DIR}/lib/mdx.dll")

# 导入目标（现代 CMake 推荐）
if(NOT TARGET mdx::mdx)
  add_library(mdx::mdx SHARED IMPORTED)
  set_target_properties(mdx::mdx PROPERTIES
      IMPORTED_LOCATION "${mdx_DLL}"
      IMPORTED_IMPLIB   "${mdx_LIB}"
      INTERFACE_INCLUDE_DIRECTORIES "${mdx_INCLUDE_DIR}"
  )
endif()
# file(COPY ${mdx_DLL} DESTINATION ${CMAKE_BINARY_DIR})
